package com.itheima.test.inner;

public class inner06 {
    public static void main(String[] args) {
        goswimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("我们去游泳吧");
            }
        });
        goswimming(()->{
            System.out.println("Lambda去游泳");
        });
    }
    public static void goswimming(Swimming swimming){
        swimming.swim();
    }
}

interface Swimming{
    public void swim();
}